<?php
namespace yan\hkecship\factory;
class Postage extends Client{
    public $path = '/version/1/postage/get';
    public function run($data=[]){
        $queryString = http_build_query($data);
        $headers[] = $this->environment->getAuthorization();
        $body = $this->curl->build($this->getUrl() . '?'.$queryString)
            ->setHeader($headers)
            ->run();
        return json_decode($body, true);
    }
    public function getUrl(){
        return $this->environment->baseUrl() . $this->path;
    }
}